namespace Warehouse

open FSharp.Windows

[<AbstractClass>]
type InventoryModel() = 
    inherit Model()

    abstract ProductSearch : ProductSearchModel with get, set
    abstract SelectedUpc : UpcModel with get, set    

    [<NotifyDependencyChanged>]
    member this.IsSeparateEnable = 
        this.SelectedUpc <> null && this.SelectedUpc.Code <> this.ProductSearch.SelectedProduct.SKU && isAdmin()

    [<NotifyDependencyChanged>]
    member this.IsMergeEnable = 
        this.SelectedUpc <> null && this.ProductSearch.SelectedProduct.UPCs.Count = 1 && isAdmin()
